#!C:\Ruby\bin\ruby.exe

if ENV['QUERY_STRING'] =~ /text=/
	hellostring = ENV['QUERY_STRING'][(ENV['QUERY_STRING'] =~ /text=/)+5..-1]
else
	hellostring = 'Hello World!'
end
puts "Content-type: text/html"
puts
puts '<?xml version="1.0" encoding="utf-8" ?>'
puts '<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
puts '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'
puts '<head><title></title></head>'
puts "<body><p>#{hellostring}</p></body>"
puts '</html>'